<uieip type="page" value="login" debug="true" timeout="5000"></uieip>
<uieip type="reg" value="console"></uieip>
<!DOCTYPE html>
<html>

<head>
    <uieip type="file" value="inc" src="/yqwin/easyui/include.txt" cache="true" minute="1440"></uieip>
    <uieip type="file" value="css" src="/yqwin/css/yqwin.min" cache="false"></uieip>
    <uieip type="file" value="js" src="/yqwin/src/yqwin.min" cache="false"></uieip>
    <title>FileEdit</title>
</head>

<body>
    <h1>SvrFile</h1>
    <p></p>
    <a href="#" class="easyui-linkbutton" data-options="" onclick="javascript:excelDownload()">excelDownload</a>
    <a href="#" class="easyui-linkbutton" data-options="" onclick="javascript:wordDownload()">wordDownload</a>

    <script>
        function excelDownload() {
            $.yqDataToExcel({
                header: [
                    { name: "a", title: "A" },
                    { name: "b", title: "B" },
                    { name: "c", title: "C" }],
                data: [
                    { a: "a1", b: "b1", c: 1 },
                    { a: "a2", b: "b2", c: 2 },
                    { a: "a3", b: "b3", c: 3 }],
                filename: "download.xls"
            }, function (res) {
                console.log(res);
            });
        }

        function wordDownload() {
            $.yqDataToWord({
                header: [
                    { name: "a", title: "A" },
                    { name: "b", title: "B" },
                    { name: "c", title: "C" }],
                data: [
                    { a: "a1", b: "b1", c: 1 },
                    { a: "a2", b: "b2", c: 2 },
                    { a: "a3", b: "b3", c: 3 }],
                filename: "download.docx"
            }, function (res) {
                console.log(res);
            });
        }
    </script>
</body>

</html>